#include "Test_Task.h"
#include <string.h>




TaskHandle_t TestTask_Handler;
/* 浮点运算入口函数*/
IMU_Data_t IMU_Data;

unsigned short compass_sample_rate;
unsigned short sample_rate;
volatile uint8_t debug_mpu;

#define TEST_TASK_PRIO 10
#define TEST_STK_SIZE 2048
void task_test_Create(void)
{
	/* 创建浮点运算任务 */
	  xTaskCreate((TaskFunction_t )test_task,            //任务函数
                (const char*    )"test_task",          //任务名称
                (uint16_t       )TEST_STK_SIZE,        //任务堆栈大小
                (void*          )NULL,                  //传递给任务函数的参数
                (UBaseType_t    )TEST_TASK_PRIO,       //任务优先级
                (TaskHandle_t*  )&TestTask_Handler);   //任务句柄    	
}

extern short mmx,mmy,mmz;
extern u8 AK8963_dat;
float pitch4,roll4,yaw4; 		//
short tt[10];
void test_task(void *pvParameters)
{
	float pitch,roll,yaw; 		//
	short aacx,aacy,aacz;		//
	short gyrox,gyroy,gyroz;	//
	short temp;					//ÎÂ¶È
	unsigned char *buf;
	unsigned long rrl;
	
	while(1)
	{
		/*
		if(debug_mpu == 1)
		{
   			debug_mpu = 0;
			mpu_get_accel_reg(IMU_Data.Compass_Data.Base_Data.Accel_Data,NULL);//获取原始加速度数据
		}
		else if(debug_mpu == 0)
		{
			debug_mpu = 1;
			

			
			while(mpu_mpl_get_data(&pitch4,&roll4,&yaw4)!=0)
			{
				debug_mpu = 1;
			}

		}
		*/
		
		vTaskDelay(20);
		
		
	}
}




